@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './token.less';

@card-prefix-cls: ~'@{kd-prefix}-card';

.@{card-prefix-cls} {
  position: relative;
  background-color: @card-color-background;
  box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.2);

  &.hoverable:hover {
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
  }

  .@{card-prefix-cls}-header {
    height: @card-sizing-title-height;
    padding: 0 58px 0 @card-spacing-padding-horizontal;
    line-height: 40px;
    font-size: @card-title-font-size;
    color: @card-title-color;
    .ellipsis;
  }

  .@{card-prefix-cls}-avatar {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 @card-spacing-padding-horizontal;

    .@{card-prefix-cls}-avatar-img {
      width: 42px;
      height: 42px;
      margin-right: @card-spacing-padding-vertical;
      overflow: hidden;

      &.circle {
        border-radius: 50%;
      }

      img {
        width: 100%;
        height: 100%;
      }
    }

    .@{card-prefix-cls}-avatar-title {
      font-size: @card-title-font-size;
      color: @card-title-color;
    }

    .@{card-prefix-cls}-avatar-desc {
      font-size: @card-content-font-size;
      color: @card-content-color;
    }
  }

  .@{kd-prefix}-checkbox {
    position: absolute;
    top: @card-spacing-padding-horizontal;
    right: @card-spacing-padding-horizontal;
  }

  .@{card-prefix-cls}-tags {
    padding: 4px @card-spacing-padding-horizontal;

    .@{kd-prefix}-tag:not(:last-child) {
      margin-right: @card-spacing-padding-vertical;
    }
  }

  .@{card-prefix-cls}-body {
    padding: @card-spacing-padding-vertical @card-spacing-padding-horizontal;
    font-size: @card-content-font-size;
    color: @card-content-color;
  }

  .@{card-prefix-cls}-actions {
    height: 32px;
    padding: 0 @card-spacing-padding-horizontal;
    line-height: 32px;
    text-align: right;
    background-color: #fafafa;

    > a {
      margin-left: 16px;
      font-size: @card-content-font-size;
      color: @card-actions-color;

      &:hover {
        color: @card-actions-color-hover;
      }

      &:active {
        color: @card-actions-color-active;
      }
    }
  }
}


.@{card-prefix-cls}-extra {
  position: absolute;
  top: 6px;
  right: 4px;
  i {
    font-size: 22px;
    width: 32px;
    cursor: pointer;
  }
}

.@{card-prefix-cls}-lists-icon {
  font-size: 32px;
  position: absolute;
  top: 6px;
  right: 40px;
}